package com.kili.cloud.common.context;


import lombok.Data;

import java.io.Serializable;

/**
 * 
 * 返回报文格式
 */
@Data
public class Result<T> implements Serializable {

	private static final long serialVersionUID = 1L;


	protected Integer code;

	protected String message;

	protected Long timestamp;
	protected T data;
	protected Object extend;

	public Result() {
		this.timestamp = System.currentTimeMillis();
	}

	public void setResultStatus(ResultStatus status){
		this.code=status.getValue();
		this.message=status.getReasonPhrase();
	}
}